package com.qingxin.ui.bean;

/**
 * 数据节点对象
 * @author Administrator
 *
 */
public abstract class BaseNode {
	protected String id;	//数据ID
	protected String name;	//名称
	protected String code;	//代码，用于权限过滤
	protected String type;	//tree：加载树；其他：数据类型
	protected String icon;	//图标
	protected String field;	//参数名
	protected String custdata = "";	//该参数不为空时会作为请求参数发送，由业务系统进行相关处理
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		if(code!=null){
			this.code = code.toUpperCase();
		}else{
			this.code = null;
		}
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getField() {
		return field;
	}
	public void setField(String field) {
		this.field = field;
	}
	public String getCustdata() {
		return custdata;
	}
	public void setCustdata(String custdata) {
		this.custdata = custdata;
	}
	
	protected void copyTo(BaseNode target){
		target.setId(id);
		target.setName(name);
		target.setCode(code);
		target.setType(type);
		target.setIcon(icon);
		target.setField(field);
		target.setCustdata(custdata);
	}
}
